package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.dragon.mmochat.model.enumType.MmochatNpcItemType;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiProtocolMessage;

public class Mmochat_14_11S extends SkymobiProtocolMessage {
	String title;
	String intro;
	String detail;
	MmochatNpcItemType type;
	int gridNum;

	public Mmochat_14_11S() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_S_14_11);
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putPrefixedString(title, 2);
		out.putPrefixedString(intro, 2);
		out.putPrefixedString(detail, 2);
		out.putInt(type.getValue());
		out.putInt(gridNum);
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public void setType(MmochatNpcItemType type) {
		this.type = type;
	}

	public void setGridNum(int gridNum) {
		this.gridNum = gridNum;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

}